package com.lottery.pay.Constants;

/**
 * 微信常量配置
 * 
 */
public class WeixinConstant {
	public static final String API_TOKEN = ""; //公众平台TOKEN

	public static final String APP_ID = "wxe325b50ecbf689d9"; //公众平台ID

	public static final String APP_SECRET = "59ae42893c9d29036c8ac0ca6b577c33";//公众平台秘钥

    public static final String API_KEY = "RedHorsetech2019redhorsetech9102"; //商户平台key

	public static final String SSL_CRET = "apiclient_cert.p12";

	public static final String MCH_ID = "1559890731"; //商户平台ID

	public static final String APP_APPID = "wxb5fc968415d336e1"; //开放平台AppID

	public static final String APP_APPSECRET = "2ecebf032e8b74a70693e6584f0ab1b9"; //开放平台AppSecret

//	public static final String APP_MCHID = "1316010301";

//	public static final String APP_SSLCRET = "app_apiclient_cert.p12";

	// 通知地址 接收微信支付异步通知回调地址
//	public static final String WEIXIN_PAYMENT_RESULT = "http://47.105.212.98:8080/baili-api/order/wxResult";

	//测试环境调试地址
	public static final String WEIXIN_PAYMENT_RESULT = "http://115.159.107.49:8080/lottery-api/order/wxResult";


	public static final String OPERATION_REGISTER = "注册";
	public static final String OPERATION_LOGIN = "登录";
	public static final String OPERATION_LOGOUT = "登出";
	public static final String USER_LOGIN_WEIXIN = "微信端";
	public static final String CERT_IS_NOT_EXISTS = "退款证书不存在";
	public static final String ORDER_NO1 = "订单号为:";
	// 订单状态 : 1:待支付 2:支付完成 3:待消费 4:待退款 8:完成 5:已退款 9:已关闭 删除 delFlag:是否删除:0有效状态
	// 1删除状态
	public static final int ORDER_TO_BE_PAID = 1;
	public static final int ORDER_COMPLETION_OF_PAYMENT = 2;
	public static final int ORDER_TO_BE_CONSUMED = 3;
	public static final int ORDER_TO_BE_REFUNDED = 4;
	public static final int ORDER_COMPLETE = 8;
	public static final int ORDER_ALREADY_REFUNDED = 5;
	public static final int ORDER_ALREADY_CLOSED = 9;
	public static final int ORDER_DEL_FLAG = 0;
	public static final int ORDER_DEL_FLAG1 = 1;
	// 支付方式 payType 0:微信JSAPI支付(微信公众号); 1:APP微信支付; 2:钱包余额支付; 3:支付宝支付
	public static final int PAY_TYPE_ZERO = 0;
	public static final int PAY_TYPE_ONE = 1;
	public static final int PAY_TYPE_TWO = 2;
	public static final int PAY_TYPE_THREE = 3;

	// 生成 获取access_token地址
	public static final String TOKEN_PATH = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=APP_ID&secret=APP_SECRET";
	// 重定向菜单地址
	public static final String REDIRECT_PATH = "https://open.weixin.qq.com/connect/oauth2/authorize?appid=APP_ID&redirect_uri=MENUPATH&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect";
	// 建立菜单地址
	public static final String MENU_PATH = "https://api.weixin.qq.com/cgi-bin/menu/create?access_token=ACCESS_TOKEN";
	// 通过openId获取用户信息地址
	public static final String INFO_PATH = "https://api.weixin.qq.com/cgi-bin/user/info?access_token=ACCESS_TOKEN&openid=OPENID&lang=zh_CN";
	// 生成 通过OAuth2.0机制code获取用户openId地址
	public static final String OPENID_PATH = "https://api.weixin.qq.com/sns/oauth2/access_token?appid=APPID&secret=SECRET&code=CODE&grant_type=authorization_code";
	// 单独用户发送微信信息网址
	public static final String ONEMESSAGESEND_PATH = "https://api.weixin.qq.com/cgi-bin/message/custom/send?access_token=";
	// 根据openId列表群发微信信息网址
	public static final String MOREMESSAGESEND_PATH = "https://api.weixin.qq.com/cgi-bin/message/mass/send?access_token=";
	// 生成js-sdk权限ticket地址
	public static final String TICKET_PATH = "https://api.weixin.qq.com/cgi-bin/ticket/getticket?access_token=ACCESS_TOKEN&type=jsapi";
	// 发起支付网址 统一下单
	public static final String PAYOFF_PATH = "https://api.mch.weixin.qq.com/pay/unifiedorder";
	//查询订单
	public static final String QUERY_PATH = "https://api.mch.weixin.qq.com/secapi/pay/orderquery";
	// 退款地址
	public static final String REFUND_PATH = "https://api.mch.weixin.qq.com/secapi/pay/refund";
	// 查看素材地址
	public static final String MATERIAL_PATH = "https://api.weixin.qq.com/cgi-bin/material/batchget_material?access_token=ACCESS_TOKEN";

	public static final String WX_LOGIN_PATH = "https://open.weixin.qq.com/connect/qrconnect?appid=APPID&redirect_uri=REDIRECT_URI&response_type=code&scope=SCOPE&state=STATE#wechat_redirect";

	/**
	 * 回复文本信息格式
	 */
	public static final String TEXT_RESPONSE_MSG = "<xml>"
			+ "<ToUserName><![CDATA[%1$s]]></ToUserName>"
			+ "<FromUserName><![CDATA[%2$s]]></FromUserName>"
			+ "<CreateTime>%3$s</CreateTime>"
			+ "<MsgType><![CDATA[%4$s]]></MsgType>"
			+ "<Content><![CDATA[%5$s]]></Content>" + "</xml>";

	/**
	 *
	 *回复素材格式
	 *
	 **/
	public static final String MEDIA_RESPONSE_MSG= "<xml> " +
			"<ToUserName><![CDATA[%1$s]]></ToUserName> " +
			"<FromUserName><![CDATA[%2$s]]></FromUserName> " +
			"<CreateTime>%3$s</CreateTime> " +
			"<MsgType><![CDATA[%4$s]]></MsgType> " +
			"<ArticleCount>1</ArticleCount> " +
			"<Articles> " +
			"<item> " +
			"<Title><![CDATA[%5$s]]></Title>  " +
			"<PicUrl><![CDATA[%6$s]]></PicUrl>" +
			"<Description><![CDATA[%7$s]]></Description> " +
			"<Url><![CDATA[%8$s]]></Url> " +
			"</item> " +
			"</Articles> " +
			"</xml> ";
	/**
	 * 统一下单信息格式
	 *
	 */
	public static final String PAYOFF_MSG = "<xml>" + "<appid>%1$s</appid>"
			+ "<mch_id>%2$s</mch_id>" + "<device_info>%3$s</device_info>"
			+ "<nonce_str>%4$s</nonce_str>" + "<sign>%5$s</sign>"
			+ "<body>%6$s</body>" + "<detail>%7$s</detail>"
			+ "<attach>%8$s</attach>" + "<out_trade_no>%9$s</out_trade_no>"
			+ "<fee_type>%10$s</fee_type>" + "<total_fee>%11$s</total_fee>"
			+ "<spbill_create_ip>%12$s</spbill_create_ip>"
			+ "<time_start>%13$s</time_start>"
			+ "<time_expire>%14$s</time_expire>"
			+ "<goods_tag>%15$s</goods_tag>" + "<notify_url>%16$s</notify_url>"
			+ "<trade_type>%17$s</trade_type>"
			+ "<product_id>%18$s</product_id>" + "<limit_pay>%19$s</limit_pay>"
//			+ "<openid>%20$s</openid>"
			+ "</xml>";

	public static final String JS_PAYOFF_MSG = "<xml>" + "<appid>%1$s</appid>"
			+ "<mch_id>%2$s</mch_id>" + "<device_info>%3$s</device_info>"
			+ "<nonce_str>%4$s</nonce_str>" + "<sign>%5$s</sign>"
			+ "<body>%6$s</body>" + "<detail>%7$s</detail>"
			+ "<attach>%8$s</attach>" + "<out_trade_no>%9$s</out_trade_no>"
			+ "<fee_type>%10$s</fee_type>" + "<total_fee>%11$s</total_fee>"
			+ "<spbill_create_ip>%12$s</spbill_create_ip>"
			+ "<time_start>%13$s</time_start>"
			+ "<time_expire>%14$s</time_expire>"
			+ "<goods_tag>%15$s</goods_tag>" + "<notify_url>%16$s</notify_url>"
			+ "<trade_type>%17$s</trade_type>"
			+ "<product_id>%18$s</product_id>" + "<limit_pay>%19$s</limit_pay>"
			+ "<openid>%20$s</openid>"
			+ "</xml>";
	public static final String PAYOFF_RETURN_MSG = "<xml>"
			+ "<return_code><![CDATA[SUCCESS]]></return_code>"
			+ "<return_msg><![CDATA[OK]]></return_msg>" + "</xml>";
	public static final String PAYOFF_RETURN_MSG_ERROR = "<xml>"
			+ "<return_code><![CDATA[FAIL]]></return_code>"
			+ "<return_msg><![CDATA[]]></return_msg>" + "</xml>";

	/**
	 * 订单查询信息格式
	 */
	public static final String QUERY_MSG = "<xml>" + " <appid>%1$s</appid>\n" +
			"   <mch_id>%2$s</mch_id>\n" +
			"   <nonce_str>%3$s</nonce_str>\n" +
			"   <transaction_id>%4$s</transaction_id>\n" +
			"   <sign>%5$s</sign>" + "</xml>";


	/**
	 * 退款信息格式
	 */
	public static final String REFUND_MSG = "<xml>" + "<appid>%1$s</appid>"
			+ "<mch_id>%2$s</mch_id>" + "<device_info>%3$s</device_info>"
			+ "<nonce_str>%4$s</nonce_str>" + "<sign>%5$s</sign>"
			+ "<out_trade_no>%6$s</out_trade_no>"
			+ "<out_refund_no>%7$s</out_refund_no>"
			+ "<refund_fee_type>%8$s</refund_fee_type>"
			+ "<total_fee>%9$s</total_fee>" + "<refund_fee>%10$s</refund_fee>"
			+ "<op_user_id>%11$s</op_user_id>" + "</xml>";
	
//	public static final String REFUND_MSG = "<xml>" + "<appid>%1$s</appid>"
//			+ "<mch_id>%2$s</mch_id>" + "<nonce_str>%3$s</nonce_str>"
//			+ "<op_user_id>%4$s</op_user_id>"
//			+ "<out_refund_no>%5$s</out_refund_no>"
//			+ "<out_trade_no>%6$s</out_trade_no>"
//			+ "<refund_fee>%7$s</refund_fee>" + "<total_fee>%8$s</total_fee>"
//			+ "<sign>%9$s</sign>" + "</xml>";

	// 优客独享简介
	public static final String SUGER_INTRODUCTION = "优客独享 ME-Sales是合肥超捷信息技术有限公司研发的面向客户（B2C）模式的可定制化总体解决方案。旨在帮助餐饮、酒店、娱乐等生活服务类企业维护客户关系、推动产品营销。\n"
			+ "优客独享分为客户端和企业端两个模块。\n"
			+ "客户端模块为客户提供丰富、详尽的产品列表，供客户无忧一键下单预订，随时随地享受互联网带来的便捷生活；\n"
			+ "企业信息详细展示，客户沟通方便快捷；\n"
			+ "中意产品立即收藏，一键分享拉动更多消费；\n\n"
			+ "企业端模块让企业轻松实现自主管理、发布服务；\n"
			+ "企业端模块让企业轻松实现自主管理、发布服务；\n"
			+ "可制定多样化营销策略；\n"
			+ "为企业统计展示详细经营数据；\n\n"
			+ "优客独享优势：\n"
			+ "1、向用户推送多样化的服务，促进用户消费；\n"
			+ "2、加强现有用户粘性，促进新用户到深度用户的转变；\n"
			+ "3、社交分享拉动新消费；\n" + "4、免费消息通知服务；\n";


	// 产品添加中
	public static final String PLEASE_WAIT = "产品正在奔赴您怀里的路上哟，马上就到，敬请期待~~";

	// 公司简介
	public static final String COMPANY_INTRODUCTION = "合肥超捷信息技术有限公司\n"
			+ "-上海超捷系统集成有限公司全资子公司。\n" + "-公司使命：用IT增值技术为客户创造新的价值。\n"
			+ "-公司理念：专业、激情、合作、成长。\n"
			+ "-企业发展战略：以应用为核心，专注行业，力争成为用户最满意的专业化软件开发商。\n\n" + "丰富的项目管理经验\n"
			+ "高质量保证\n" + "具有良好技能的开发团队\n" + "通过有效管理保证软件发布时间\n" + "开发平台:\n"
			+ "HP-Unix, SCO-Unix, Linux, Windows\n" + "开发语言:\n"
			+ "C/C++, VC++, Java, JSP, ASP,C#\n" + "遵循规范:\n"
			+ "TSP, PSP,XP,ISO9001,CMM3\n";

	// 联系我们
	public static final String CALL_US = "联系我们：\n\n" + "合肥超捷信息技术有限公司\n"
			+ "http://www.superv.com.cn\n"
			+ "柳彦         0551-65871066-8046    yliu@superv.com.cn\n"
			+ "徐德         0551-65871066-8008    dxu@superv.com.cn\n";
}
